package com.action;


import com.service.DepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class DepAction {

    @Autowired
    private DepService depService;


    @RequestMapping("/showDep")
    public String  showDep(Model  m)
    {
        List list = depService.findAll();
        m.addAttribute("list",list);
        m.addAttribute("age",20);
        return "showDep.html";
    }



}




